package com.kyh.entity;

import javax.persistence.Table;


import java.util.Date;

import com.kyh.annotation.Model;
import com.kyh.entity.base.BaseEntity;

/**
*/
@Table(name="arcticle_log")
public class ArcticleLog extends BaseEntity<ArcticleLog> {

	@Model(nameTable="id")
	private Long id; // 主键ID
	@Model(nameTable="arcticleId")
	private Long arcticleId; // 文章ID
	@Model(nameTable="title")
	private String title; // 标题
	@Model(nameTable="content")
	private String content; // 文章内容
	@Model(nameTable="status")
	private Integer status; // 
	@Model(nameTable="createTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date createTime; // 
	@Model(nameTable="updateTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date updateTime; // 

	public Long getId() {
		return id;
	}
	public ArcticleLog setId(Long id) {
		this.id = id;
		return this;
	}
	public Long getArcticleId() {
		return arcticleId;
	}
	public ArcticleLog setArcticleId(Long arcticleId) {
		this.arcticleId = arcticleId;
		return this;
	}
	public String getTitle() {
		return title;
	}
	public ArcticleLog setTitle(String title) {
		this.title = title;
		return this;
	}
	public String getContent() {
		return content;
	}
	public ArcticleLog setContent(String content) {
		this.content = content;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public ArcticleLog setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public ArcticleLog setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public ArcticleLog setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static ArcticleLog arcticleLog(
			Long arcticleId,
			String title,
			String content,
			Integer status
			) {
		ArcticleLog entity = new ArcticleLog();
		entity.setArcticleId(arcticleId);
		entity.setTitle(title);
		entity.setContent(content);
		entity.setStatus(status);
		return entity;
	}
}